Integrand size = 19, antiderivative size = 90 \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {a b \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{3/2} d}-\frac {a \cos (c+d x)}{\left (a^2+b^2\right ) d}+\frac {b \sin (c+d x)}{\left (a^2+b^2\right ) d} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3599, 3188, 2717, 2718, 3153, 212} \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {a b \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{d \left (a^2+b^2\right )^{3/2}}+\frac {b \sin (c+d x)}{d \left (a^2+b^2\right )}-\frac {a \cos (c+d x)}{d \left (a^2+b^2\right )} \]
[In]
[Out]
Rule 212
Rule 2717
Rule 2718
Rule 3153
Rule 3188
Rule 3599
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos (c+d x) \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx \\ & = \frac {a \int \sin (c+d x) \, dx}{a^2+b^2}+\frac {b \int \cos (c+d x) \, dx}{a^2+b^2}-\frac {(a b) \int \frac {1}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{a^2+b^2} \\ & = -\frac {a \cos (c+d x)}{\left (a^2+b^2\right ) d}+\frac {b \sin (c+d x)}{\left (a^2+b^2\right ) d}+\frac {(a b) \text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,b \cos (c+d x)-a \sin (c+d x)\right )}{\left (a^2+b^2\right ) d} \\ & = \frac {a b \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{3/2} d}-\frac {a \cos (c+d x)}{\left (a^2+b^2\right ) d}+\frac {b \sin (c+d x)}{\left (a^2+b^2\right ) d} \\ \end{align*}
Time = 0.46 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.88 \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {-2 a b \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )+\sqrt {a^2+b^2} (-a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right )^{3/2} d} \]
[In]
[Out]
Time = 0.70 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 a}{\left (a^{2}+b^{2}\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {4 a b \,\operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (2 a^{2}+2 b^{2}\right ) \sqrt {a^{2}+b^{2}}}}{d}\) | \(101\) |
default | \(\frac {\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 a}{\left (a^{2}+b^{2}\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {4 a b \,\operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (2 a^{2}+2 b^{2}\right ) \sqrt {a^{2}+b^{2}}}}{d}\) | \(101\) |
risch | \(-\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 \left (-i b +a \right ) d}-\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 \left (i b +a \right ) d}+\frac {i b a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i b +a}{\sqrt {-a^{2}-b^{2}}}\right )}{\sqrt {-a^{2}-b^{2}}\, \left (a^{2}+b^{2}\right ) d}-\frac {i b a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i b +a}{\sqrt {-a^{2}-b^{2}}}\right )}{\sqrt {-a^{2}-b^{2}}\, \left (a^{2}+b^{2}\right ) d}\) | \(169\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 185 vs. \(2 (86) = 172\).
Time = 0.28 (sec) , antiderivative size = 185, normalized size of antiderivative = 2.06 \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\sqrt {a^{2} + b^{2}} a b \log \left (\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) - 2 \, {\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right ) + 2 \, {\left (a^{2} b + b^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} \]
[In]
[Out]
\[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\int \frac {\sin {\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.48 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.57 \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {a b \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{2} + b^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (a - \frac {b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}}{a^{2} + b^{2} + \frac {{\left (a^{2} + b^{2}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}}{d} \]
[In]
[Out]
none
Time = 0.43 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.31 \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {a b \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{2} + b^{2}\right )}^{\frac {3}{2}}} + \frac {2 \, {\left (b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a\right )}}{{\left (a^{2} + b^{2}\right )} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}}}{d} \]
[In]
[Out]
Time = 4.45 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.22 \[ \int \frac {\sin (c+d x)}{a+b \tan (c+d x)} \, dx=\frac {2\,a\,b\,\mathrm {atanh}\left (\frac {a^2\,b+b^3-a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^2+b^2\right )}{{\left (a^2+b^2\right )}^{3/2}}\right )}{d\,{\left (a^2+b^2\right )}^{3/2}}-\frac {\frac {2\,a}{a^2+b^2}-\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^2+b^2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
[In]
[Out]